home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Utilities / MView / gxu / stripoutline.h < prev   
Encoding:
C/C++ Source or Header  |  2004-09-30  |  2.1 KB  |  63 lines

  1. #pragma once
  2.  
  3. #ifndef STRIPOUTLINE_H
  4. #define STRIPOUTLINE_H
  5.  
  6. /*//////////////////////////////////////////////////////////////////////////////
  7. //
  8. // File: stripoutline.h
  9. //
  10. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  11. //
  12. //
  13. //////////////////////////////////////////////////////////////////////////////*/
  14.  
  15. #include "gxcrackfvf.h"
  16. #include "crackdecl.h"
  17.  
  18. struct SLine 
  19. {
  20.     WORD m_iFirstPoint;
  21.     WORD m_iSecondPoint;
  22. };
  23.  
  24. class CStripOutline
  25. {
  26. public:
  27.     CStripOutline();
  28.     ~CStripOutline();
  29.  
  30.     HRESULT Init( LPD3DXBASEMESH ptmDrawMesh);
  31.  
  32.  
  33.     HRESULT Draw( LPDIRECT3DDEVICE9 pDevice, DWORD iSubset,
  34.                     LPD3DXEFFECT pfxShowNormals, 
  35.                     LPD3DXEFFECT pfxColor, 
  36.                     DWORD dwColor,
  37.                     D3DXMATRIX *rgmIndexedMatrices, DWORD cIndexedMatrices);
  38.  
  39. private:
  40.     HRESULT CreateEmptyOutline();
  41.     void    AppendPoint(CD3DXCrackDecl1 &cdMesh, PUINT pwFaceCur, PBYTE pvMeshPoints, PBYTE pvLinePoints, UINT &iCurPoint);
  42.     void    AppendMidpoint(CD3DXCrackDecl1 &cdMesh, PUINT pwFace1, PUINT pwFace2, PBYTE pvMeshPoints, PBYTE pvLinePoints, UINT &iCurPoint);
  43.     void    AppendSkinnedPoint(CD3DXCrackDecl1 &cdMesh, PUINT pwFaceCur, DWORD iEdge, PBYTE pvMeshPoints, PBYTE pvLinePoints, UINT &iCurPoint);
  44.     void    AppendSkinnedMidpoint(CD3DXCrackDecl1 &cdMesh, PUINT pwFace1, PUINT pwFace2, PBYTE pvMeshPoints, PBYTE pvLinePoints, UINT &iCurPoint);
  45.     void    AppendIndexSkinnedPoint(CD3DXCrackDecl1 &cdMesh, PUINT pwFaceCur, DWORD iEdge, PBYTE pvMeshPoints, PBYTE pvLinePoints, UINT &iCurPoint);
  46.     void    AppendIndexSkinnedMidpoint(CD3DXCrackDecl1 &cdMesh, PUINT pwFace1, PUINT pwFace2, PBYTE pvMeshPoints, PBYTE pvLinePoints, UINT &iCurPoint);
  47.  
  48.     DXCrackFVF  m_cfvf;
  49.     BOOL m_bSkinning;
  50.     BOOL m_bIndexSkinning;
  51.     BOOL m_bHWVertexShaders;
  52.     LPDIRECT3DVERTEXBUFFER9 m_pVertexBuffer;
  53.     LPDIRECT3DVERTEXDECLARATION9 m_pDecl;
  54.  
  55.     D3DXATTRIBUTERANGE *m_rgaeAttributeTable;
  56.     DWORD m_caeAttributeTable;
  57.  
  58.     UINT        m_cLines;
  59.     UINT        m_cVertices;
  60. };
  61.  
  62. #endif
  63.